package com.tianji.learning.utils;

/**
 * @author Administrator
 * @version 1.0
 * @description: TODO
 * @date 2024/9/1 18:53
 */
public class TableInfoContext {
    private static final ThreadLocal<String> TL = new ThreadLocal<>();

    /**
     * 保存表名信息
     * @param tableName 表名
     */
    public static void setTableName(String tableName){
        TL.set(tableName);
    }

    /**
     * 获取表名
     * @return 表名
     */
    public static String getTableName(){
        return TL.get();
    }

    /**
     * 移除表名信息
     */
    public static void removeTableName(){
        TL.remove();
    }
}
